GetByIndex

Function

This API is used to match AI > Recognition > SnapedObjects snapshot object ID.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
MsgIdnull
Engine0intWhich search engine, 0 or 1, to use with the search interface
StartIndexintThe starting index of the request, for example, the first time: 0-19, the second time: 20-39, the StartIndex is 0, 20, and only GetByIndex has this field
CountintThe requested number of passenger-vehicle information, only GetByIndex has this field
SimpleInfo1intGet short information, or complete information. 1- Abbreviated information,0- full information, abbreviated information contains only UUId, only GetByIndex has this field
UUIds[103, 105, 190, 129]arrayThe unique identification of the capture information to be obtained, only GetById has this field
WithObjectImage1intWhether a picture of an object (such as a pedestrian, a car) is required, 1- Yes, 0- No
WithBackgroud0intDo you need a background image? 1- Yes, 0- No

Tips:

Response messages and request messages may not contain all the fields in the table above. If no fields are included, the device does not support this parameter configuration.

Sample:

POST /API/AI/SnapedObjects/GetByIndex HTTP/1.1
{
	"data": {
		"MsgId": null,
		"Engine": 0,		
		"StartIndex": 0,	
		"Count": 20,		
		"SimpleInfo": 1,	
		"WithObjectImage": 0, 
		"WithBackgroud": 0 
	}
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
MsgIdnull
Result0intSee the resultAI > Recognition > SnapedObjects > Search > Parameter Description > Table x
TotalCountintThe total number of objects searched, only GetByIndex has this field
CountintThe total number of objects in this response
SnapedObjInfoarraySnapedObjects JSON show as follow Table 3

Table 3 |Parameter|Range|Type|Description| | ---- | ---- | ---- | ---- | |UUId|| string| Unique Id of the captured object. You can use this ID to obtain detailed information about the object | |Chn|| int |passage | |StrChn| “CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capability of the device.| string| passage | |StartTime || unsigned long long |Unix timestamp, such as 1540444116 | |EndTime || unsigned long long |Unix timestamp, such as 1540444116 | |ObjectImage| "base64(imgData)" |string |The front IPC sent to capture the picture of people and cars | |Background |"base64(imgData)"| string |Captured background image from the front-end IPC | |SnapId || unsigned int| The Id of the picture taken by the front-end IPC | |Type |1 |int| The type of the captured object, such as: 0-face, 1-humanoid, 2-model, 3-PID humanoid, 4-PID model, 5-LCD humanoid, 6-LCD model |

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
	"data": {
		"MsgId": null,
		"Result": 0,	
		"TotalCount": 600,  
		"Count": 20,	
		"SnapedObjInfo": [
			{
				"UUId": 103,	
				"Chn": 3,
				"StrChn":"CH4",
				"StartTime": 1540444116, 
				"EndTime": 1540444137, 
				"ObjectImage": "base64(imgData)",	
				"Background": "base64(imgData)",	
				"SnapId": 2375,
				"Type": 1				
			},
			{
				"UUId": 105,	
				"Chn": 6,
				"StrChn":"CH7",
				"StartTime": 1540444116, 
				"EndTime": 1540444139, 
				"ObjectImage": "base64(imgData)",	
				"Background": "base64(imgData)",	
				"SnapId": 2375,
				"Type": 2		
			},
			{
				...
			},
			...
		]
	}
}

Error Code

See Response Messages Body and Common error_code for more information.